﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="http://1stjs.googlecode.com/svn/trunk/fw4/" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</meta>
<title>F.highlight演示</title>
<style type="text/css">
.dbox{
	font-family:Courier New;
	font-size:12px;
	border:1px solid #8a8a8a;
	background-color:#eeeeee;
	margin-top:15px;
	padding:6px;
}
</style>
<script type="text/javascript" src="1st.js"></script>
<script type="text/javascript" src="1st.highlight.js"></script>
<script type="text/javascript">
var showTime = function(callback){
	var t1 = new Date();
	callback();
	var t2 = new Date();
	alert("耗时 "+(t2-t1)+" 毫秒");
}
</script>
</head>
<body>
<textArea id="code" rows="12" cols="80">
<!doctype html>
<html>
<head>
    <meta charset="gbk"/>
    <title>语法加亮插件例子</title>
    <style>
    /*内嵌样式*/
    h1{
        padding:8px;margin:0;
        border:1px solid #ddd;
    }
    </style>
    <script src="http://jsbaba.com/tool/lightcode/lc.js"></script>
    <script>
    /*内嵌js*/
    function hello(){
        var txt=new Array('h','e','l','l','o');
        onload=function(){
            for(var i=0;i<txt.length;i++){
                alert(txt[i]);
            }
        };
    }
    hello();
</script>
</head>
<body>
    <div>
        <h1 style="color:green;">html加亮例子</h1>
        <!--<p>html注释</p>-->
    </div><table>
</body>
</html>
</textArea>

<br/>
<button onclick="showTime(function(){F('display').highlight(F.node('code').value);})">go</button>
<div id="display" class="dbox"></div>
</body>
</html>